import 'dart:ui';

import 'package:flutter/material.dart';

class BianKuangText extends StatelessWidget {
  const BianKuangText({
    super.key,
    required this.text,
    required this.color,
    required this.borderColor,
    required this.textSize,
    required this.borderWidth,
  });

  final String text;
  final Color color;
  final Color borderColor;
  final double textSize;
  final double borderWidth;

  @override
  Widget build(BuildContext context) {
    return Stack(
      children: [
        Text(
          text,
          style: TextStyle(
            fontSize: textSize,
            fontFamily: 'Rubik One',
            foreground:
                Paint()
                  ..style = PaintingStyle.stroke
                  ..strokeWidth = borderWidth
                  ..color = borderColor,
          ),
        ),
        Text(
          text,
          style: TextStyle(
            fontSize: textSize,
            fontFamily: 'Rubik One',
            color: color,
          ),
        ),
      ],
    );
  }
}
